package com.hnust.controller;

import com.hnust.MainApp;
import com.hnust.fx.FXMLController;
import com.hnust.store.DataStore;
import com.hnust.store.SubjectStore;
import com.hnust.view.LoginView;
import javafx.fxml.Initializable;
import org.springframework.beans.factory.annotation.Autowired;

import java.net.URL;
import java.util.ResourceBundle;


@FXMLController
public class PopupController implements Initializable {
    @Autowired
    private MainController mainController;
    @Autowired
    private DataStore dataStore;
    @Autowired
    private SubjectStore subjectStore;

    @Override
    public void initialize(URL location, ResourceBundle resources) {
        
    }

    public void shiftPersonData() {
        mainController.skipView("个人资料");
    }

    public void exitSystem() {
        dataStore.setToken(null);
        MainApp.switchView(LoginView.class);
        subjectStore.setFirst(true);
    }
}
